<template>
  <div id="app">
    <div id="nav">
      <router-link to="/">Home</router-link> |
      <router-link to="/about">About</router-link> |
      <router-link to="/drag">drag</router-link> |
      <router-link to="/colspan">colspan</router-link>|
      <router-link to="/newTable">newTable</router-link>|
    </div>
    <router-view />
  </div>
</template>
<script>
export default {
  data () {
    return {
      a: 123
    }
  },
  mounted () {
    this.getTest(1)
    console.log(process.env)
    let array = [
      { name: '123', age: '456', data: [{ name: 'abc', value: 'fgh' }, { name: 'abd', value: 'fgr' }], sex: '897' },
      { name: '786', age: '453', data: [{ name: 'abc', value: 'xcv' }, { name: 'abd', value: 'vcx' }], sex: '675' }
    ]

    array.map(item => {
      item.data.map(json => {
        item[json.name] = json.value
      })
    })

    console.log(array)
  },
  methods: {
    getTest (a) {
      return a;
    }
  }
}
</script>

<style lang="stylus">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
